*for REStat paper "Breastfeeding and Children's Early Cognitive Outcomes."

libname in 'x:\Donnanew';

**okay, let's do mother's religion;
*pindpcg has info. on primary caregiver for '97;

data one;
set in.pindpcg;

proc sort;  by intnum84;

proc means;
run;

data two;
set in.relmom;
keep intnum84 v10961 v10990;
intnum84 = v10002;
if intnum84 ne .;

proc sort;  by intnum84;

data three;
merge one two;  by intnum84;
if pcg97id ne .;

proc sort;  by intnum85;

data four;
set in.relmom;
keep intnum85 v11923 v11981 v12278 v12336;
intnum85 = v11102;
if intnum85 ne .;

proc sort;  by intnum85;

data five;
merge three four;  by intnum85;
if pcg97id ne .;

proc sort;  by intnum86;

data six;
set in.relmom;
keep intnum86 v13484 v13486 v13530 v13533 v13550 v13604;
intnum86 = v12502;
if intnum86 ne .;

proc sort;  by intnum86;

data seven;
merge five six;  by intnum86;
if pcg97id ne .;

proc sort;  by intnum87;

data eight;
set in.relmom;
keep intnum87 v14531 v14533 v14577 v14580 v14597 v14651;
intnum87 = v13702;
if intnum87 ne .;

proc sort;  by intnum87;

data nine;
merge seven eight;  by intnum87;
if pcg97id ne .;

proc sort;  by intnum88;

data ten;
set in.relmom;
keep intnum88 v15831 v15888 v16005 v14580 v16007 v16051 v16054 v16071 v16125;
intnum88 = v14802;
if intnum88 ne .;

proc sort;  by intnum88;

data eleven;
merge nine ten;  by intnum88;
if pcg97id ne .;

proc sort;  by intnum89;

data twelve;
set in.relmom;
keep intnum89 v17402 v17404 v17448 v17451 v17468 v17522;
intnum89 = v16302;
if intnum89 ne .;

proc sort;  by intnum89;

data thirt;
merge eleven twelve;  by intnum89;
if pcg97id ne .;

proc sort;  by intnum90;  

data fourt;
set in.relmom;
keep intnum90 v18733 v18735 v18779 v18799 v18853;
intnum90 = v17702;
if intnum90 ne .;

proc sort;  by intnum90;

data fift;
merge thirt fourt;  by intnum90;
if pcg97id ne .;

proc sort;  by intnum91;

data sixt;
set in.relmom;
keep intnum91 v20033 v20035 v20079 v20082 v20099 v20153;
intnum91 = v19002;
if intnum91 ne .;

proc sort;  by intnum91;

data sevent;
merge fift sixt;  by intnum91;
if pcg97id ne .;

proc sort;  by intnum92;

data eightt;
set in.relmom;
keep intnum92 v21339 v21341 v21385 v21405 v21459;
intnum92 = v20302;
if intnum92 ne .;

proc sort;  by intnum92;

data ninet;
merge sevent eightt;  by intnum92;
if pcg97id ne .;

proc sort;  by intnum93;

data twenty;
set in.relmom;
keep intnum93 v23196 v23198 v23242 v23245 v23261 v23315;
intnum93 = v21602;
if intnum93 ne .;

proc sort;  by intnum93;

data twenty1;
merge ninet twenty;  by intnum93;
if pcg97id ne .;

proc sort;  by intnum94;

data twenty2;
set in.relmom;
keep intnum94 er3863 er3866 er3913 er3914 er3917 er3926 er3983 er3984;
intnum94 = er2002;
if intnum94 ne .;

proc sort;  by intnum94;

data twenty3;
merge twenty1 twenty2;
by intnum94;
if pcg97id ne .;

proc sort;  by intnum95;

data twenty4;
set in.relmom;
keep intnum95 er6733 er6736 er6783 er6784 er6787 er6796 er6853 er6854;
intnum95 = er5002;
if intnum95 ne .;

proc sort;  by intnum95;

data twenty5;
merge twenty3 twenty4;  
by intnum95;
if pcg97id ne .;

proc sort;  by intnum96;

data twenty6;
set in.relmom;
keep intnum96 er8979 er8982 er9029 er9030 er9033 er9042 er9099 er9100;
intnum96 = er7002;
if intnum96 ne .;

proc sort;  by intnum96;

data twenty7;
merge twenty5 twenty6;  by intnum96;
if pcg97id ne .;

proc sort;  by intnum97;

data twenty8;
set in.relmom;
keep intnum97 er11731 er11734 er11740 er11742 er11743 er11745 er11746 er11747
     er11807 er11808 er11812 er11821 er11823 er11824 er11826 er11827 er11828 er11895 
     er11896;
intnum97 = er10002;
if intnum97 ne .;

proc sort;  by intnum97;

data twenty9;
merge twenty7 twenty8;  by intnum97;
if pcg97id ne .;

proc sort;  by intnum99;

data thirty;
set in.relmom;
keep intnum99 er15805 er15808 er15815 er15817 er15818 er15820 er15821 er15884
     er15885 er15890 er15900 er15902 er15903 er15905 er15906 er15977 er15978 
     ;
intnum99 = er13002;
if intnum99 ne .;

proc sort;  by intnum99;

data thirty1;
merge twenty9 thirty;  by intnum99;
if pcg97id ne .;

proc sort;  by intnum01;

data thirty2;
set in.relmom;
keep intnum01 er19866 er19869 er19876 er19878 er19879 er19881 er19882 er19945
     er19946 er19951 er19961 er19963 er19964 er19966 er19967 er20038 er20039 
     ;
intnum01 = er17002;
if intnum01 ne .;

proc sort;  by intnum01;

data thirty3;
merge thirty1 thirty2;  by intnum01;
if pcg97id ne .;

proc sort;  by intnum03;

data thirty4;
set in.relmom;
keep intnum03 er23303 er23306 er23313 er23315 er23316 er23318 er23319 er23382
     er23383 er23388 er23398 er23400 er23401 er23403 er23404 er23474 er23475 
     ;
intnum03 = er21002;
if intnum03 ne .;

proc sort;  by intnum03;

data thirty5;
merge thirty3 thirty4;  by intnum03;
if pcg97id ne .;

proc sort;  by intnum05;

data thirty6;
set in.relmom;
keep intnum05 er27263 er27266 er27274 er27276 er27277 er27279 er27280 er27281
     er27346 er27347 er27352 er27363 er27365 er27366 er27368 er27369 er27370 
     er27442 er27443;
intnum05 = er25002;
if intnum05 ne .;

proc sort;  by intnum05;

data thirty7;
merge thirty5 thirty6; by intnum05;
if pcg97id ne .;

data in.relmom2;
keep childid cath bapt;
set thirty7;

*religion;
cath = .;
bapt = .;

if relpcg97 = 1 then do;

*let's try religious preference;
if hw85 = 1 then do;
   if v11981 = 1 then cath = 1;
   else if (v11981 ge 2 and v11981 le 20) then cath = 0;
   else if v11981 = 0 then cath = 0;
   if v11981 = 3 then bapt = 1;
   else if ((v11981 = 1 or v11981 = 2) or (v11981 ge 4 and v11981 le 20)) then bapt = 0;
   else if v11981 = 0 then bapt = 0;
end;
if hw85 = 2 then do;
   if v12336 = 1 then cath = 1;
   else if (v12336 ge 2 and v12336 le 20) then cath = 0;
   else if v12336 = 0 then cath = 0;
   if v12336 = 3 then bapt = 1;
   else if ((v12336 = 1 or v12336 = 2) or (v12336 ge 4 and v12336 le 20)) then bapt = 0;
   else if v12336 = 0 then bapt = 0;
end;
if (hw86 = 1 and v13533 = 1 and cath = .) then do;
   if v13604 = 1 then cath = 1;
   else if (v13604 ge 2 and v13604 le 20) then cath = 0;
   else if v13604 = 0 then cath = 0;
   if v13604 = 3 then bapt = 1;
   else if ((v13604 = 1 or v13604 = 2) or (v13604 ge 4 and v13604 le 20)) then bapt = 0;
   else if v13604 = 0 then bapt = 0;
end;
if (hw86 = 2 and v13484 = 1 and cath = .) then do;
   if v13530 = 1 then cath = 1;
   else if (v13530 ge 2 and v13530 le 20) then cath = 0;
   else if v13530 = 0 then cath = 0;
   if v13530 = 3 then bapt = 1;
   else if ((v13530 = 1 or v13530 = 2) or (v13530 ge 4 and v13530 le 20)) then bapt = 0;
   else if v13530 = 0 then bapt = 0;
end;

*no update trigger, all get it;
if (hw87 = 1 and cath = .) then do;
   if v14651 = 1 then cath = 1;
   else if (v14651 ge 2 and v14651 le 20) then cath = 0;
   else if v14651 = 0 then cath = 0;
   if v14651 = 3 then bapt = 1;
   else if ((v14651 = 1 or v14651 = 2) or (v14651 ge 4 and v14651 le 20)) then bapt = 0;
   else if v14651 = 0 then bapt = 0;
end;
if (hw87 = 2 and cath = .) then do;
   if v14577 = 1 then cath = 1;
   else if (v14577 ge 2 and v14577 le 20) then cath = 0;
   else if v14577 = 0 then cath = 0;
   if v14577 = 3 then bapt = 1;
   else if ((v14577 = 1 or v14577 = 2) or (v14577 ge 4 and v14577 le 20)) then bapt = 0;
   else if v14577 = 0 then bapt = 0;
end;
*added some extra codes;
if (hw88 = 1 and v16054 = 1 and cath = .) then do;
   if v16125 = 1 then cath = 1;
   else if (v16125 ge 2 and v16125 le 97) then cath = 0;
   else if v16125 = 0 then cath = 0;
   if v16125 = 3 then bapt = 1;
   else if ((v16125 = 1 or v16125 = 2) or (v16125 ge 4 and v16125 le 97)) then bapt = 0;
   else if v16125 = 0 then bapt = 0;
end;
if (hw88 = 2 and v16005 = 1 and cath = .) then do;
   if v16051 = 1 then cath = 1;
   else if (v16051 ge 2 and v16051 le 97) then cath = 0;
   else if v16051 = 0 then cath = 0;
   if v16051 = 3 then bapt = 1;
   else if ((v16051 = 1 or v16051 = 2) or (v16051 ge 4 and v16051 le 97)) then bapt = 0;
   else if v16051 = 0 then bapt = 0;
end;

if (hw89 = 1 and v17451 = 1 and cath = .) then do;
   if v17522 = 1 then cath = 1;
   else if (v17522 ge 2 and v17522 le 97) then cath = 0;
   else if v17522 = 0 then cath = 0;
   if v17522 = 3 then bapt = 1;
   else if ((v17522 = 1 or v17522 = 2) or (v17522 ge 4 and v17522 le 97)) then bapt = 0;
   else if v17522 = 0 then bapt = 0;
end;
if (hw89 = 2 and v17402 = 1 and cath = .) then do;
   if v17448 = 1 then cath = 1;
   else if (v17448 ge 2 and v17448 le 97) then cath = 0;
   else if v17448 = 0 then cath = 0;
   if v17448 = 3 then bapt = 1;
   else if ((v17448 = 1 or v17448 = 2) or (v17448 ge 4 and v17448 le 97)) then bapt = 0;
   else if v17448 = 0 then bapt = 0;
end;
*forgot to pull off check for new head, see if can work around it, maybe isn't one;
if (hw90 = 2 and v18733 = 1 and cath = .) then do;
   if v18779 = 1 then cath = 1;
   else if (v18779 ge 2 and v18779 le 97) then cath = 0;
   else if v18779 = 0 then cath = 0;
   if v18779 = 3 then bapt = 1;
   else if ((v18779 = 1 or v18779 = 2) or (v18779 ge 4 and v18779 le 97)) then bapt = 0;
   else if v18779 = 0 then bapt = 0;
end;
*looks like are 5 with 0s, will not fill them in, along with 99s, so I think okay;
*can hand check later;
if (hw90 = 1 and cath = .) then do;
   if v18853 = 1 then cath = 1;
   else if (v18853 ge 2 and v18853 le 97) then cath = 0;
   if v18853 = 3 then bapt = 1;
   else if ((v18853 = 1 or v18853 = 2) or (v18853 ge 4 and v18853 le 97)) then bapt = 0;
end;

if (hw91 = 2 and v20033 = 1 and cath = .) then do;
   if v20079 = 1 then cath = 1;
   else if (v20079 ge 2 and v20079 le 97) then cath = 0;
   else if v20079 = 0 then cath = 0;
   if v20079 = 3 then bapt = 1;
   else if ((v20079 = 1 or v20079 = 2) or (v20079 ge 4 and v20079 le 97)) then bapt = 0;
   else if v20079 = 0 then bapt = 0;
end;
if (hw91 = 1 and v20082 = 1 and cath = .) then do;
   if v20153 = 1 then cath = 1;
   else if (v20153 ge 2 and v20153 le 97) then cath = 0;
   else if v20153 = 0 then cath = 0;
   if v20153 = 3 then bapt = 1;
   else if ((v20153 = 1 or v20153 = 2) or (v20153 ge 4 and v20153 le 97)) then bapt = 0;
   else if v20153 = 0 then bapt = 0;
end;

*again, no check for head in 1992, forgot it, or it doesn't exist;
*checked, and no valid values in end;
if (hw92 = 2 and v21339 = 1 and cath = .) then do;
   if v21385 = 1 then cath = 1;
   else if (v21385 ge 2 and v21385 le 97) then cath = 0;
   else if v21385 = 0 then cath = 0;
   if v21385 = 3 then bapt = 1;
   else if ((v21385 = 1 or v21385 = 2) or (v21385 ge 4 and v21385 le 97)) then bapt = 0;
   else if v21385 = 0 then bapt = 0;
end;
if (hw92 = 1 and cath = .) then do;
   if v21459 = 1 then cath = 1;
   else if (v21459 ge 2 and v21459 le 97) then cath = 0;
   if v21459 = 3 then bapt = 1;
   else if ((v21459 = 1 or v21459 = 2) or (v21459 ge 4 and v21459 le 97)) then bapt = 0;
end;
**again, only a few zeros.  If left off var., could hand check later;
**checked--in end, no valid values;
if (hw93 = 2 and v23196 = 1 and cath = .) then do;
   if v23242 = 1 then cath = 1;
   else if (v23242 ge 2 and v23242 le 97) then cath = 0;
   else if v23242 = 0 then cath = 0;
   if v23242 = 3 then bapt = 1;
   else if ((v23242 = 1 or v23242 = 2) or (v23242 ge 4 and v23242 le 97)) then bapt = 0;
   else if v23242 = 0 then bapt = 0;
end;
if (hw93 = 1 and v23245 = 1 and cath = .) then do;
   if v23315 = 1 then cath = 1;
   else if (v23315 ge 2 and v23315 le 97) then cath = 0;
   else if v23315 = 0 then cath = 0;
   if v23315 = 3 then bapt = 1;
   else if ((v23315 = 1 or v23315 = 2) or (v23315 ge 4 and v23315 le 97)) then bapt = 0;
   else if v23315 = 0 then bapt = 0;
end;

*starting in 1994, broken into two questions, but seems to match up;
if (hw94 = 2 and er3863 = 1 and bapt = .) then do;
   if er3913 = 1 then cath = 1;
   else if (er3913 ge 2 and er3913 le 97) then cath = 0;
   else if er3913 = 0 then cath = 0;
   if (er3913 = 8 and er3914 = 3) then bapt = 1;
   else if ((er3913 = 1 or er3913 = 2) or (er3913 ge 10 and er3913 le 97)) then bapt = 0;
   else if er3913 = 0 then bapt = 0;
   else if ((er3913 = 8 and er3914 ne 3) and (er3914 ge 0 and er3914 le 97)) then bapt=0;
end;
if (hw94 = 1 and er3917 = 1 and bapt = .) then do;
   if er3983 = 1 then cath = 1;
   else if (er3983 ge 2 and er3983 le 97) then cath = 0;
   else if er3983 = 0 then cath = 0;
   if (er3983 = 8 and er3984 = 3) then bapt = 1;
   else if ((er3983 = 1 or er3983 = 2) or (er3983 ge 10 and er3983 le 97)) then bapt = 0;
   else if er3983 = 0 then bapt = 0;
   else if ((er3983 = 8 and er3984 ne 3) and (er3984 ge 0 and er3984 le 97)) then bapt=0;
end;

if (hw95 = 2 and er6733 = 1 and bapt = .) then do;
   if er6783 = 1 then cath = 1;
   else if (er6783 ge 2 and er6783 le 97) then cath = 0;
   else if er6783 = 0 then cath = 0;
   if (er6783 = 8 and er6784 = 3) then bapt = 1;
   else if ((er6783 = 1 or er6783 = 2) or (er6783 ge 10 and er6783 le 97)) then bapt = 0;
   else if er6783 = 0 then bapt = 0;
   else if ((er6783 = 8 and er6784 ne 3) and (er6784 ge 0 and er6784 le 97)) then bapt=0;
end;
if (hw95 = 1 and er6787 = 1 and bapt = .) then do;
   if er6853 = 1 then cath = 1;
   else if (er6853 ge 2 and er6853 le 97) then cath = 0;
   else if er6853 = 0 then cath = 0;
   if (er6853 = 8 and er6854 = 3) then bapt = 1;
   else if ((er6853 = 1 or er6853 = 2) or (er6853 ge 10 and er6853 le 97)) then bapt = 0;
   else if er6853 = 0 then bapt = 0;
   else if ((er6853 = 8 and er6854 ne 3) and (er6854 ge 0 and er6854 le 97)) then bapt=0;
end;

if (hw96 = 2 and er8979 = 1 and bapt = .) then do;
   if er9029 = 1 then cath = 1;
   else if (er9029 ge 2 and er9029 le 97) then cath = 0;
   else if er9029 = 0 then cath = 0;
   if (er9029 = 8 and er9030 = 3) then bapt = 1;
   else if ((er9029 = 1 or er9029 = 2) or (er9029 ge 10 and er9029 le 97)) then bapt = 0;
   else if er9029 = 0 then bapt = 0;
   else if ((er9029 = 8 and er9030 ne 3) and (er9030 ge 0 and er9030 le 97)) then bapt=0;
end;
if (hw96 = 1 and er9033 = 1 and bapt = .) then do;
   if er9099 = 1 then cath = 1;
   else if (er9099 ge 2 and er9099 le 97) then cath = 0;
   else if er9099 = 0 then cath = 0;
   if (er9099 = 8 and er9100 = 3) then bapt = 1;
   else if ((er9099 = 1 or er9099 = 2) or (er9099 ge 10 and er9099 le 97)) then bapt = 0;
   else if er9099 = 0 then bapt = 0;
   else if ((er9099 = 8 and er9100 ne 3) and (er9100 ge 0 and er9100 le 97)) then bapt=0;
end;

if (hw97 = 2 and er11731 = 1 and bapt = .) then do;
   if er11807 = 1 then cath = 1;
   else if (er11807 ge 2 and er11807 le 97) then cath = 0;
   else if er11807 = 0 then cath = 0;
   if (er11807 = 8 and er11808 = 3) then bapt = 1;
   else if ((er11807 = 1 or er11807 = 2) or (er11807 ge 10 and er11807 le 97)) then bapt = 0;
   else if er11807 = 0 then bapt = 0;
   else if ((er11807 = 8 and er11808 ne 3) and (er11808 ge 0 and er11808 le 97)) then bapt=0;
end;
if (hw97 = 1 and er11812 = 1 and bapt = .) then do;
   if er11895 = 1 then cath = 1;
   else if (er11895 ge 2 and er11895 le 97) then cath = 0;
   else if er11895 = 0 then cath = 0;
   if (er11895 = 8 and er11896 = 3) then bapt = 1;
   else if ((er11895 = 1 or er11895 = 2) or (er11895 ge 10 and er11895 le 97)) then bapt = 0;
   else if er11895 = 0 then bapt = 0;
   else if ((er11895 = 8 and er11896 ne 3) and (er11896 ge 0 and er11896 le 97)) then bapt=0;
end;

if (hw99 = 2 and er15805 = 1 and bapt = .) then do;
   if er15884 = 1 then cath = 1;
   else if (er15884 ge 2 and er15884 le 97) then cath = 0;
   else if er15884 = 0 then cath = 0;
   if (er15884 = 8 and er15885 = 3) then bapt = 1;
   else if ((er15884 = 1 or er15884 = 2) or (er15884 ge 10 and er15884 le 97)) then bapt = 0;
   else if er15884 = 0 then bapt = 0;
   else if ((er15884 = 8 and er15885 ne 3) and (er15885 ge 0 and er15885 le 97)) then bapt=0;
end;
if (hw99 = 1 and er15890 = 1 and bapt = .) then do;
   if er15977 = 1 then cath = 1;
   else if (er15977 ge 2 and er15977 le 97) then cath = 0;
   else if er15977 = 0 then cath = 0;
   if (er15977 = 8 and er15978 = 3) then bapt = 1;
   else if ((er15977 = 1 or er15977 = 2) or (er15977 ge 10 and er15977 le 97)) then bapt = 0;
   else if er15977 = 0 then bapt = 0;
   else if ((er15977 = 8 and er15978 ne 3) and (er15978 ge 0 and er15978 le 97)) then bapt=0;
end;

if (hw01 = 2 and er19866 = 1 and bapt = .) then do;
   if er19945 = 1 then cath = 1;
   else if (er19945 ge 2 and er19945 le 97) then cath = 0;
   else if er19945 = 0 then cath = 0;
   if (er19945 = 8 and er19946 = 3) then bapt = 1;
   else if ((er19945 = 1 or er19945 = 2) or (er19945 ge 10 and er19945 le 97)) then bapt = 0;
   else if er19945 = 0 then bapt = 0;
   else if ((er19945 = 8 and er19946 ne 3) and (er19946 ge 0 and er19946 le 97)) then bapt=0;
end;
if (hw01 = 1 and er19951 = 1 and bapt = .) then do;
   if er20038 = 1 then cath = 1;
   else if (er20038 ge 2 and er20038 le 97) then cath = 0;
   else if er20038 = 0 then cath = 0;
   if (er20038 = 8 and er20039 = 3) then bapt = 1;
   else if ((er20038 = 1 or er20038 = 2) or (er20038 ge 10 and er20038 le 97)) then bapt = 0;
   else if er20038 = 0 then bapt = 0;
   else if ((er20038 = 8 and er20039 ne 3) and (er20039 ge 0 and er20039 le 97)) then bapt=0;
end;

if (hw03 = 2 and er23303 = 1 and bapt = .) then do;
   if er23382 = 1 then cath = 1;
   else if (er23382 ge 2 and er23382 le 97) then cath = 0;
   else if er23382 = 0 then cath = 0;
   if (er23382 = 8 and er23383 = 3) then bapt = 1;
   else if ((er23382 = 1 or er23382 = 2) or (er23382 ge 10 and er23382 le 97)) then bapt = 0;
   else if er23382 = 0 then bapt = 0;
   else if ((er23382 = 8 and er23383 ne 3) and (er23383 ge 0 and er23383 le 97)) then bapt=0;
end;
if (hw03 = 1 and er23388 = 1 and bapt = .) then do;
   if er23474 = 1 then cath = 1;
   else if (er23474 ge 2 and er23474 le 97) then cath = 0;
   else if er23474 = 0 then cath = 0;
   if (er23474 = 8 and er23475 = 3) then bapt = 1;
   else if ((er23474 = 1 or er23474 = 2) or (er23474 ge 10 and er23474 le 97)) then bapt = 0;
   else if er23474 = 0 then bapt = 0;
   else if ((er23474 = 8 and er23475 ne 3) and (er23475 ge 0 and er23475 le 97)) then bapt=0;
end;

if (hw05 = 2 and er27263 = 1 and bapt = .) then do;
   if er27346 = 1 then cath = 1;
   else if (er27346 ge 2 and er27346 le 97) then cath = 0;
   else if er27346 = 0 then cath = 0;
   if (er27346 = 8 and er27347 = 3) then bapt = 1;
   else if ((er27346 = 1 or er27346 = 2) or (er27346 ge 10 and er27346 le 97)) then bapt = 0;
   else if er27346 = 0 then bapt = 0;
   else if ((er27346 = 8 and er27347 ne 3) and (er27347 ge 0 and er27347 le 97)) then bapt=0;
end;
if (hw05 = 1 and er27352 = 1 and bapt = .) then do;
   if er27442 = 1 then cath = 1;
   else if (er27442 ge 2 and er27442 le 97) then cath = 0;
   else if er27442 = 0 then cath = 0;
   if (er27442 = 8 and er27443 = 3) then bapt = 1;
   else if ((er27442 = 1 or er27442 = 2) or (er27442 ge 10 and er27442 le 97)) then bapt = 0;
   else if er27442 = 0 then bapt = 0;
   else if ((er27442 = 8 and er27443 ne 3) and (er27443 ge 0 and er27443 le 97)) then bapt=0;
end;

end;

proc means;
run;
